<div class="ad-table-ajax-container" ng-if="items.paging.totalPages || localConfig.loadingData || !attrs.itemsNotFoundMessage">
  <table class="ad-sticky-table {{ attrs.tableClasses || tableClasses }}"
         ng-if="attrs.tableMaxHeight || attrs.tableFixedHeight"
         ng-class="{'ad-fixed-layout': (attrs.tableMaxHeight || attrs.tableFixedHeight)}">
    <thead>
      <tr class="ad-user-select-none" ng-include="'tableajax/headerRowContent.html'"></tr>
    </thead>
  </table>
  <div class="ad-table-container" ng-style="{'max-height': localConfig.tableMaxHeight, 'height' : attrs.tableFixedHeight}">
    <table class="{{ attrs.tableClasses || tableClasses }}"
           ng-class="{'ad-fixed-layout': (attrs.tableMaxHeight || attrs.tableFixedHeight)}">
      <thead>
        <tr class="ad-user-select-none" ng-if="!(localConfig.tableMaxHeight || attrs.tableFixedHeight)" ng-include="'tableajax/headerRowContent.html'"></tr>
      </thead>
      <tbody>
        <tr ng-repeat-start="item in items.list"
            ng-class="getRowClass(item, $index)"
            ng-include="'tableajax/rowContent.html'"
            ng-click="onRowClick(item, $event)"></tr>
        <tr ng-if="attrs.rowExpandTemplate && adStrapUtils.itemExistsInList($index, localConfig.expandedItems)" ng-repeat-end>
          <td colspan="{{ visibleColumnDefinition.length + 1}}"
              ng-include="attrs.rowExpandTemplate"></td>
        </tr>
      </tbody>
    </table>
    <ad-loading-overlay loading="localConfig.loadingData"></ad-loading-overlay>
  </div>
  <ng-include src="'tableajax/pagination.html'"></ng-include>
</div>
<div ng-if="localConfig.showNoDataFoundMessage && !localConfig.loadingData && attrs.itemsNotFoundMessage">
  <div class="alert alert-info" role="alert">{{ attrs.itemsNotFoundMessage }}</div>
</div>
